<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.zhufei.entity.UserInfo" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>">
    
    <title>残友风采</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="css/css.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
<div class="head">
	<div class="top">
		<div class="logo"><img src="images/logo.jpg" /></div>
		<div class="topmenu">
			<a href="aboutus.jsp">关于我们</a> |
			<a href="#" onclick=window.external.AddFavorite(location.href,document.title)>加入收藏</a> |
			<a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.glszhufei.com');">设为首页</a>
		</div>
	</div>
	<div class="menu">
	
		<div class="main">
			<ul>
				<li><a href="index.jsp">首页</a></li>
				<li><a href="aboutus.jsp">关于我们</a></li>
				<li  class="bgnone"><a href="fengcaiServlet">残友风彩</a></li>
				<li><a href="http://bbs.glszhufei.com" target="_blank">论坛</a></li>
				<li><a href="lovesInfo.jsp">爱心企业与个人</a></li>
				<li><a href="registration.jsp">我要参与</a></li>
			</ul>
		</div>
	
	</div>
	
	<div class="banner">
		<img src="images/banner.jpg" />
	</div>
</div>
<div class="aboutus">

	<div class="abnav">
		<div class="list"><a href="aboutus.jsp">关于我们</a></div>
		<div class="list list2"><a href="fengcaiServlet">残友风采</a></div>
		<div class="list"><a href="http://bbs.glszhufei.com" target="_blank">论坛</a></div>
		<div class="list"><a href="lovesInfo.jsp">爱心企业与个人</a></div>
		<div class="list"><a href="registration.jsp">我要参与</a></div>
		<div class="list"><a href="newsServlet?action=showList">新闻列表</a></div>
	</div>
  <div class="abright">
	
		<div class="url">
			首页 >> 残友风采
		</div>
         <%
			ArrayList<UserInfo> userinfoList = (ArrayList<UserInfo>)session.getAttribute("uinfoList");
			int pageRecord = (Integer)session.getAttribute("page_record");
			int curPages =(Integer)session.getAttribute("current_page");
			int totalPages = (Integer)session.getAttribute("total_page");
			int curPic = 0;
			for(int i = (curPages-1) * 6,j = 0 ; i < userinfoList.size() && j < pageRecord ; i++,j++){
			UserInfo userinfo = userinfoList.get(i);
			String url = "userPersonalInfo.jsp?username=" + userinfo.getUsername();
			if(i%2==0)
			{
			   
		  %>
				<div class="bbs border">
				<div class="title greenfont"><strong><%=userinfo.getReal_name() %></strong></div>
			       <div class="fengcaiPic" style="border:0">
			     <a href="<%=url%>" target="_blank">
				         <img src="<%=userinfo.getAvatar_route() %>" style="width:320px; height:220px;" />
				         </a>
                   </div>
                </div> 
	      <% }
			else{
			%>
			<div class="bbs border bbs2">
				<div class="title greenfont"><strong><%=userinfo.getReal_name() %></strong></div>
			       <div class="fengcaiPic" style="border:0">
			       <a href="<%=url%>" target="_blank">
				         <img src="<%=userinfo.getAvatar_route()%>" style="width:320px; height:220px;"  />
				         </a>
                   </div>
             </div>
	       <%
			 }}
		   %>
	</div>
	<table width="85%" border="2" align="center" cellspacing="0"
						bordercolor="#FFFFFF" bgcolor="#CCCCCC">
						<tr bgcolor="#F7F7F7">
							<td width="632" background="images/topbg.gif">
								<p align="center">
									<a href="fengcaiServlet">首页</a>
									<%
										if (curPages > 1) {
									%>
									
									<a href="fengcaiServlet?page=<%=curPages - 1%>">上一页</a>
									<%
										}
									%>
									<%
										if (curPages < totalPages) {
									%>
									
									<a href="fengcaiServlet?page=<%=curPages + 1%>">下一页</a>
									<%
										}
									%>
									<a href="fengcaiServlet?page=<%=totalPages%>">尾页</a>
									
									共<%=totalPages%>页
								</p>
							</td>
						</tr>
					</table>
</div>

<div class="footer">
	深圳市橄榄树助飞基金<br>
	地址：深圳市罗湖区宝安南路3097号洪涛大厦四楼<br>
	电话：0755-25595903、25590786 传真：25595900<br>
	Copyright &copy; 2011 www.glszhufei.com, All Rights Reserved.
</div>
</body>
</html>
